/**
 * Created by Administrator on 2015/11/9.
 */

function big(t){
    document.getElementById(t).style.height=40+"px"
    document.getElementById(t).style.background="#EEEEEE";
    document.getElementById(t).style.marginTop=0+"px";


}
function smell(t){
    document.getElementById(t).style.height=30+"px"
    document.getElementById(t).style.background="white";
    document.getElementById(t).style.marginTop=10+"px";

}

function fdd(t) {


    var img_url = document.getElementById(t).src;
    var image=document.getElementById('image');

    document.getElementById('imgtest').style.display="block"
    document.getElementById('fdg_fdj').style.display="block"

    document.getElementById("imgtest").innerHTML='<img src="'+img_url+'"id="show" style="width: 200%; height: 200%;z-index:9999" />'
    var obj=image.offsetParent;
    document.onmousemove=function(e){


        e=e? e:window.event;


        var x=parseInt(e.offsetX*(-2)+80)
        var y=parseInt(e.offsetY*(-1.5)+100)
        if(e.offsetY<80){
            document.getElementById('fdg_fdj').style.display="none"
            document.getElementById('imgtest').style.display="none"
        }

        document.getElementById("fdg_fdj").style.marginLeft= (e.offsetX-45)+"px";
        document.getElementById("fdg_fdj").style.marginTop= (e.offsetY-85)+"px";

        document.getElementById("show").style.marginLeft=x+"px";
        document.getElementById("show").style.marginTop=y+"px";


        //document.getElementById("imgtest2").style.marginLeft=parseInt(x)+"px"
        //document.getElementById("imgtest2").style.marginTop=parseInt(y)+"px"

    }
  /*  document.onmousemove=function(e){
        e=e? e:window.event;
        var x=parseInt(e.screenX)*(-2)+270;
        var y=parseInt(e.screenY)*(-1.5)+550;
        document.getElementById("fdg_fdj").style.marginLeft= (e.screenX-140)+"px";
        document.getElementById("fdg_fdj").style.marginTop= (e.screenY-400)+"px";
        document.getElementById("show").style.marginLeft=x+"px";
        document.getElementById("show").style.marginTop=y+"px";


        document.getElementById("imgtest2").style.marginLeft=parseInt(x)+"px"
        document.getElementById("imgtest2").style.marginTop=parseInt(y)+"px"

    }*/

}
function th(t){
    var img_url = document.getElementById(t).src;
    document.getElementById("image").src=img_url;
}
function miss(t){
    document.getElementById(t).style.display="none";

}


function change(t,g){
    if(t=="spsm"){
        document.getElementById(g).style.display = "block";
        document.getElementById(t).style.height = 40 + "px"
        document.getElementById(t).style.background = "white"
        document.getElementById(t).style.marginTop = -27 + "px"

    }
    else{
        document.getElementById(g).style.display = "block";
        document.getElementById(t).style.height = 40 + "px"
        document.getElementById(t).style.background = "white"
        document.getElementById(t).style.marginTop = -27 + "px"
        document.getElementById('line1').style.display="none";
        document.getElementById('spsm').style.height=28+"px"
        document.getElementById('spsm').style.background="#f3f3f3"
        document.getElementById('spsm').style.marginTop=-15+"px"
        document.getElementById(t).style.borderBottom=0+"px"

    }
}
function restore(t,g) {

    document.getElementById(g).style.display = "none";
    document.getElementById(t).style.height = 28 + "px"
    document.getElementById(t).style.background = "#f3f3f3"
    document.getElementById(t).style.marginTop = -15 + "px"


}
function pd(){
    document.getElementById('line1').style.display = "block";
    document.getElementById('spsm').style.height = 40 + "px"
    document.getElementById('spsm').style.background = "white"
    document.getElementById('spsm').style.marginTop = -27 + "px"

}

function line_left(t){

    document.getElementById(t).style.marginLeft = 20 + "px"
}
function line_right(t){

    document.getElementById(t).style.marginLeft = 150 + "px"

}

function fy_next(){
    var number=document.getElementById('ys').innerHTML
    number=parseInt(number)+1;
    if(number>4){

    }else {
        document.getElementById('ys').innerHTML = number;

        var qdqy = parseInt(number) - 1;
        document.getElementById('fy' + qdqy).style.background = "#DADADA";
        document.getElementById('fy' + qdqy).style.color = "#000000";
        document.getElementById('fy' + number).style.color = "#ffffff";
        document.getElementById('fy' + number).style.background = "#FFBA00";
    }
}
function fy_back(){
    var number=document.getElementById('ys').innerHTML
    number=parseInt(number)-1;
    if(number<1){

    }else {
        document.getElementById('ys').innerHTML = number;

        var qdqy = parseInt(number) + 1;
        document.getElementById('fy' + qdqy).style.background = "#DADADA";
        document.getElementById('fy' + qdqy).style.color = "#000000";
        document.getElementById('fy' + number).style.color = "#ffffff";
        document.getElementById('fy' + number).style.background = "#FFBA00";
    }
}
function fy_onclick(t){

   var number= document.getElementById(t).value;

    for(i=1;i<5;i++){

        if(i==number){
            continue;
        }else{


            var qdqy=i;
            document.getElementById('fy' + qdqy).style.background = "#DADADA";
            document.getElementById('fy' + qdqy).style.color = "#000000";

        }
        document.getElementById('ys').innerHTML=number;
        document.getElementById('fy' + number).style.color = "#ffffff";
        document.getElementById('fy' + number).style.background = "#FFBA00";
    }

}
function change_bg(t){
    document.getElementById(t).style.background = "#CF5606";

}
function hy(t){
    if(t=="li6"){
        document.getElementById(t).style.background = "#E5004F";

    }else if(t=="li7"){
        document.getElementById(t).style.background = "#FC1967";

    }else {
        document.getElementById(t).style.background = "#FF6600";
    }
}

function miss_value(t){
    document.getElementById(t).value="";

}
function szz(){
    var name=document.getElementsByName('q').value;
    window.location.href="shop_search.html?name="+name;
}

function detail_change(t){
    if(t=="spsm"){
        document.getElementById('iframe_apxq').src="./detail_iframe/production_detail.html";
    }else if(t=="shbz"){
        document.getElementById('iframe_apxq').src="./detail_iframe/production_service.html";

    }
}